using System;
using System.Collections;
using System.Collections.Generic;
using UIFramework;
using UnityEngine;

public class Manager : MonoBehaviour
{
   public static Manager Instance;
    private void Awake()
    {        
        Instance = this;
    }

    private void Start()
    {
        InitUdp();
    }

    public Queue<string> MsgQue = new Queue<string>();

    private UDPRecvThread udpRecv;

    private void InitUdp()
    {
        udpRecv = new UDPRecvThread();
        udpRecv.ProcssUDPMsg = UpdProcessMsg;
        udpRecv.Start(12316);
    }

    private void UpdProcessMsg(string msg)
    {
        MsgQue.Enqueue(msg);
    }

    private void OnDestroy()
    {
        udpRecv.Stop();
    }
    // Update is called once per frame
    void Update()
    {
        
    }
}
